home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
share
/
gtksourceview-2.0
/
language-specs
/
dtd.lang
< prev
next >
Wrap
Extensible Markup Language
|
2009-10-02
|
5KB
|
140 lines
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<language id="dtd" _name="DTD" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-dtd</property>
<property name="globs">*.dtd</property>
<property name="block-comment-start"><!--</property>
<property name="block-comment-end">--></property>
</metadata>
<styles>
<style id="entity" _name="entity" map-to="xml:entity"/>
<style id="decl" _name="decl" map-to="xml:doctype"/>
<style id="error" _name="error" map-to="xml:error"/>
<style id="quoted-value" _name="quoted-value" map-to="xml:attribute-value"/>
</styles>
<definitions>
<define-regex id="prefix">[a-zA-Z_][a-zA-Z0-9._-]*</define-regex>
<define-regex id="name">[a-zA-Z_][a-zA-Z0-9.:_-]*</define-regex>
<context id="entity" style-ref="entity">
<match>%\%{name};</match>
</context>
<context id="decl-element">
<start><!ELEMENT\b</start>
<end>></end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="quoted-value" style-ref="quoted-value">
<start>"</start>
<end>"</end>
<include>
<context style-ref="entity">
<match>[%&]\%{name};</match>
</context>
<context style-ref="error" extend-parent="false">
<match>[%&]\S*</match>
</context>
</include>
</context>
<context id="NDATA" extend-parent="false">
<start>\bNDATA\b</start>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context>
<match>\%{name}</match>
</context>
<context ref="error"/>
</include>
</context>
<context id="decl-entity">
<start><!ENTITY\s+(%\s+)?\%{name}\b</start>
<end>></end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="quoted-value"/>
<context extend-parent="false">
<start>(SYSTEM|PUBLIC)(?=\s|$)</start>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context ref="quoted-value"/>
<context ref="NDATA"/>
<context ref="error"/>
</include>
</context>
<context ref="error"/>
</include>
</context>
<context id="decl-attlist">
<start><!ATTLIST\b</start>
<end>></end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="decl-notation">
<start><!NOTATION\b</start>
<end>></end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="error" style-ref="error" extend-parent="false">
<match>\S+</match>
</context>
<context id="dtd">
<include>
<context ref="xml:comment"/>
<context ref="decl-element"/>
<context ref="decl-entity"/>
<context ref="decl-attlist"/>
<context ref="decl-notation"/>
</include>
</context>
</definitions>
</language>